package view.entities;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

/**
 * 
 * TODO ONGOING: I was working on these to 
 * draw the game board graphics using code and	
 *  without using sprites. Good results, maybe 
 *  we can continue with this as a new game type.
 * 
 * 
 * 
 * 
 * @author ben
 *
 */
public class WallFactory implements IViewFactory {

	private Dimension dimension;
	
	public WallFactory(Dimension dimension) {
		this.dimension = dimension;
	}
	
	@Override
	public void paintEntity(Graphics2D g) {
		
		Graphics2D g2 = (Graphics2D) g.create();
		
		double x = 0;
		double y = 0;
		double width = dimension.getWidth();
		double height = dimension.getHeight();
		
		Rectangle2D rectangle = new Rectangle2D.Double(x, y, width, height);
		Rectangle2D clip = new Rectangle2D.Double(width / 4, height / 4, width / 2, height / 2);
		
		g2.setColor(Color.ORANGE);
		g2.draw(rectangle);
		g2.fill(rectangle);
		g2.setColor(Color.BLACK);
		g2.fill(clip);
		
		
	}
	
	public Dimension getDimension() {
		return dimension;
	}

}
